<{include file="Public/top.html"}>
</head>
<body>
<div id="warpper">
    <div class="content">
        <div class="location">签到设置</div>
        <div class="ui-tab">
            <{include file="Sign/setNav.html"}>
        </div>
        <!--表格内容-->
        <form id="submitForm">
            <table class="ui-table ui-body" style="border-bottom: 2px #eee solid;">
                <thead>
                <tr>
                    <th style="width: 100%">数据配置</th>
                </tr>
                </thead>
                <tbody>
                <tr style="height: 80px;">
                    <td style="border-style:none;float: left;height: 30px;"><p style="width: 50%;">第<input type="text" name="realDayLimit" class="ui-text" placeholder="50" value="<{$data[0]}>" />人后开始使用虚拟签到(-1表示不使用该功能)</p></td>
                </tr>
                <tr style="height: 80px;">
                    <td style="border-style:none;float: left;height: 30px;"><p style="width: 50%">虚拟签到数范围：<input type="text" class="ui-text" placeholder="0" value="<{$data[1]}>" name="min"/>-<input type="text" class="ui-text" placeholder="10" value="<{$data[2]}>" name="max" /></p></td>
                </tr>
                </tbody>
            </table>
            <div class="ui-form-item inline-block" style="margin-top: 20px;margin-left: 30%;">
                <button type="button" class="ui-button" onclick="saveData()">提交</button>
            </div>
            <div class="ui-form-item inline-block" style="margin-top: 20px;margin-left: 20%;">
                <button type="button" class="ui-button" style="background: #ccc" onclick="javascript:window.location.reload();">重置</button>
            </div>
        </form>
    </div>
</div>
<{include file="Public/foot.html" }>
</body>
</html>
<script>
    function saveData(){
        var param = $("#submitForm").serialize();
        var url = "<{U('Sign/saveSetData')}>";
        $.getJSON(url,param,function(){
            window.location.reload();
        });
     }
</script>
